<template>
	<view class="index">
		<BoxItem class="menu-item" v-for="(item, index) in menuList" :key="index" 
			:label="item.label" :icon="item.icon" :path="item.path"
		/>
	</view>
</template>

<script>
import BoxItem from "@/components/BoxItem/BoxItem";

	export default {
		components: {
			BoxItem
		},
		data() {
			return {
				menuList: [
					// {
					// 	label: '订单管理',
					// 	icon: '/static/images/icons/file.png',
					// 	path: '/pages/order/Order',
					// },
				]
			}
		},
		onLoad() {
			
		},
		methods: {
			confirmLogout() {
				this.$showModal('确认退出当前账号？', '退出提示', () => {
					// let loginOutInfo = storage.get('loginOutInfo')
					// let remember = storage.get('remember')
					// // 清理缓存
					// storage.clear()
					// if(!remember) { loginOutInfo.password = '' }
					// else { storage.set('remember', '1') }
					// storage.set('loginOutInfo', loginOutInfo)
					uni.reLaunch({
						url: '/pages/index/Login',
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	@mixin fc-mid {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	@mixin fr-mid {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	.index {
		@include fc-mid;
		background: #F8F8F8;
		justify-content: flex-start;
		height: 100vh;
		& > view {
			width: 100%;
		}
		.summary-area {
			width: calc(100vw - 2rem);
			padding: 1rem;
			.factory-name {
				@include fc-mid;
				color: #fff;
				font-size: 1.4rem;
				line-height: 1.75rem;
				margin: 1rem;
				align-items: center;
			}
			.num-area {
				@include fc-mid;
				color: #fff;
				margin-top: 1rem;
				flex: 1;
				.label {
					line-height: 1.15rem;
					color: #BDE4B7;
				}
				.value {
					font-weight: bold;
					font-size: 1.5rem;
					line-height: 3rem;
					color: '#fff';
				}
				.money {
					font-family: 'WeChat Sans Std Regular';
					font-size: 3rem;
					line-height: 5.5rem;
					position: relative;
				}
				.money::after {
					content: '¥';
					position: absolute;
					left: -2rem;
					top: 0;
					font-weight: 500;
					font-size: 2.5rem;
					line-height: 5rem;
				}
			}
			.count-area {
				@include fr-mid;
				.line {
					width: 2rpx;
					height: 3rem;
					margin: 0 1rem;
					background: #BDE4B7;
				}
			}
		}
		.static-menu {
			background: #fff;
			margin-bottom: 1rem;
		}
		.dynamic-menu {
			display: flex;
			flex-wrap: wrap;
			background: #fff;
			padding-bottom: 3rem;
			.menu-item {
				box-sizing: border-box;
				flex: 0 0 33.33%;
				height: 33vw;
				border: 3rpx solid #F8F8F8;
			}
		}
	}
</style>
